
#include <stdio.h>

#include "modules/audio_processing/agc/agc.h"
using namespace webrtc;

int main(void)
{
    int ret;

    Agc* agc = new Agc();
    printf("new Agc: %p \r\n", agc);

    ret = agc->set_target_level_dbfs(-3);
    printf("set_target_level_dbfs: %d \r\n", ret);

    int16_t frame[160] = {0};
    rtc::ArrayView<const int16_t> array(frame, 160);
    agc->Process(array);
    printf("Process\r\n");

    float voice = agc->voice_probability();
    printf("voice_probability: %f \r\n", voice);

    delete agc;
    printf("delete agc\r\n");
    return 0;
}
